package com.zt.english.fragment

import com.zt.english.activity.word.ChangePlanActivity
import com.zt.english.activity.word.SearchWordActivity
import com.zt.english.activity.word.WordLibraryActivity
import com.zt.english.databinding.FragmentWordBinding
import com.zt.english.utils.SystemUtil
import com.zt.mvvm.common.utils.gotoActivity
import com.zt.mvvm.viewmodel.BaseViewModel

class WordViewModel :BaseViewModel<WordRepository, FragmentWordBinding>() {
    val mFragment by lazy {
        mLifecycleOwner as WordFragment
    }
    val mContext by lazy {
        mFragment.mContext
    }
    override fun initView() {
        mBinding.wordTv.setOnClickListener {
            gotoActivity<ChangePlanActivity>(mContext)
        }
        mBinding.searchView.setOnClickListener {
            gotoActivity<SearchWordActivity>(mContext)
        }
        mBinding.root.setPadding(0,SystemUtil.getStateBarHeight(mContext),0,0)
    }
    override fun initData() {

    }
}